﻿<!DOCTYPE html>
<html>
<head>
   <title>Adding the Auxiliary Subsystem to the VI-CarRealTime model</title>
   <meta name="generator" content="Help & Manual">
   <meta name="keywords" content="">
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link type="text/css" href="default.css" rel="stylesheet">
   <link type="text/css" href="custom.css" rel="stylesheet">
   <script type="text/javascript" src="nsh.js"></script>
   
<!-- non-scrolling headers for CHM and browser-based help, local styles-->
<style TYPE="text/css" media="screen"> 
   <!-- 
   body {    
      margin:0; 
      padding:0; 
      overflow: auto; 
      background: #edede9; 
   } 
   #idheader { 
      width:100%; 
      height:auto; 
      padding: 0; 
      margin: 0;     
} 
    #idheaderbg  {
    background: #E40A00; 
}
#idheadernowrap  {
    white-space:nowrap; 
}
    ul {list-style-type: lower-roman}
   -->
   </style>
   
<style TYPE="text/css" MEDIA="print">
<!--
/* Hide navigation links and add space between header
     and text in the printed version. Not valid for eBooks. */
#idnav { display:none;	 }
.topichead { padding: 5px 5px 20px 5px; }
-->
</style>   
   <script type="text/javascript" src="jquery.js"></script>
   <script type="text/javascript" src="helpman_settings.js"></script>
   <script type="text/javascript" src="helpman_topicinit.js"></script>

   <script type="text/javascript">
     HMSyncTOC("index.html", "drvsim_tut_adding_the_auxiliary_subsystem.htm");
   </script>
   <script type="text/javascript" src="highlight.js"></script>
   <script type="text/javascript">
     $(document).ready(function(){highlight();});
   </script>
</head>
<body>

<!--ZOOMSTOP-->

<div id="idheader" >
<div id="idheaderbg">
<table width="100%" border="0" cellspacing="0" cellpadding="0" 
       style="margin: 0px; color: #D7D7D7;">

  <tr valign="middle">
    <td align="left" valign="middle" class="topichead">
    <!--<div id="idheadernowrap">-->
    <p class="crumbs" id="idnav"><b>Navigation:</b>&nbsp;
   
   VI-DriveSim 19.2 on Windows &gt; VI-DriveSim 19.2 Tutorials &gt; <a href="drvsim_tut_running_ni-pxi_simulation_with.htm">Running NI-PXI simulation with VI-DriveSim on Windows</a>&nbsp;&gt;</p>
      <h1 class="p_Heading1" style="page-break-after: avoid;"><span class="f_Heading1">Adding the Auxiliary Subsystem to the VI-CarRealTime model</span></h1>

    <!--</div>-->
    </td>
    <td align="right" width="180" valign="middle" class="topichead" id="idnav">
    <div id="idheadernowrap">
    <a href="javascript: print();"
    		onmouseover="document.images.prntr.src='print_a.png'" 
        onmouseout="document.images.prntr.src='print_n.png'"
        ><img name="prntr" border="0" alt="Print this Topic" title="Print this Topic" src="print_n.png"
        ></a>&nbsp;&nbsp;
     <a href="drvsim_tut_running_ni-pxi_simulation_with.htm"
        onmouseover="document.images.prev.src='back_a.png'" 
        onmouseout="document.images.prev.src='back_n.png'"
        ><img name=prev src="back_n.png" border=0 alt="Previous page"
        ></a><a href="drvsim_tut_running_ni-pxi_simulation_with.htm"
        onmouseover="document.images.main.src='top_a.png'" 
        onmouseout="document.images.main.src='top_n.png'"><img name=main src="top_n.png" border=0 alt="Return to chapter overview"
        ></a><a href="drvsim_tut_creating_the_drvsim_name_simul.htm"
        onmouseover="document.images.next.src='next_a.png'" 
        onmouseout="document.images.next.src='next_n.png'"><img name=next src="next_n.png" border=0 alt="Next page"
        ></a>
    </div>
    </td>
  </tr>
</table>
</div>

<!-- The following code displays Expand All/Collapse All links  below the header in topics containing toggles -->
  

</div>  



<div id="idcontent"><div id="innerdiv"> 
<!--ZOOMRESTART-->
<p class="p_Normal">For the complete creation of the VI-CarRealTime model please refer to the tutorial of the<span style="font-style: italic;"> VI-CarRealTime</span><span class="f_NormalIndentParameters" style="font-style: italic;"> 19.2 Documentation</span><span class="f_NormalIndentParameters">, at the </span><span style="font-style: italic;">VI-CarRealTime NI-PXI Overlay </span>chapter. The only action needed in order to perform the simulation with VI-DriveSim regards the adding of an Auxiliary Subsystem to the VI-CarRealTime model. This subsystem allows the communication between VI-CarRealTime installed on the NI-PXI machine and  VI-DriveSim installed on a different machine.</p>
<p class="p_Normal">In this tutorial, the VI-CarRealTime SedanCar model is used as example.</p>
<p class="p_Normal">Click on the root node of the SedanCar project and then in the <span style="font-style: italic;">Subsystem Definition </span>tab <span style="font-weight: bold;">activate the flag </span><span style="font-style: italic; font-weight: bold;">Auxiliary</span><span style="font-weight: bold;"> </span>to add an Auxiliary Subsystem to the model, required for this application. Then click on the icon on the right to select the subsystem, as shown in the following figure.</p>
<p class="p_Normal">&nbsp;</p>
<p class="p_Normal">&nbsp;</p>
<p class="p_Normal" style="text-align: center;"><img alt="drvsim_nipxi_subsystem" width="960" height="520" style="margin:0px auto 0px auto;width:960px;height:520px;border:none" src="drvsim_nipxi_subsystem.png"/></p>
<p class="p_Normal" style="text-align: center;">&nbsp;</p>
<p class="p_Normal" style="text-align: left;">Then, select the Auxiliary Subsystem named<span style="font-weight: bold;"> VI_CRT_NIPXI_subsystem.xml</span>, placed in the <span style="font-style: italic;">carrealtime_shared</span> database, as shown below.</p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p class="p_Normal">&nbsp;</p>
<p class="p_Normal" style="text-align: center;"><img alt="drvsim_nipxi_subsystem2" width="960" height="521" style="margin:0px auto 0px auto;width:960px;height:521px;border:none" src="drvsim_nipxi_subsystem2.png"/></p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p class="p_Normal" style="text-align: left;">Then click the Apply button to confirm these changes and add the subsystem to the model.</p>
<p class="p_Normal">Now the Auxiliary Subsystem is added to the model and then set up the subsystem parameters by clicking on the folder VI_CRT_NIPXI_subsystem of the project and in the tab Parameters insert the correct values. All the parameters must be maintained as default, except for the field <span style="font-weight: bold;">client_ip</span>, which represent the IP address of the machine where VI-DriveSim in installed (in this tutorial the IP is 192.168.100.21). Then click the Save button.</p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p class="p_Normal">&nbsp;</p>
<p class="p_Normal" style="text-align: center;"><img alt="drvsim_nipxi_subsystem3" width="960" height="521" style="margin:0px auto 0px auto;width:960px;height:521px;border:none" src="drvsim_nipxi_subsystem3.png"/></p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p class="p_Normal" style="text-align: left;">A brief description of all the subsystem parameters is presented below:</p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<div style="text-align: justify; text-indent: 0px; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;"><table style="border:none; border-spacing:0px; border-collapse:collapse;">
<thead>
<tr style="text-align:left;vertical-align:top;">
<th style="vertical-align:middle; width:189px; height:33px; background-color:#99ccff; padding:0px; border:solid thin #000000;"><p style="text-align: center;"><span style="font-size: 8pt; font-weight: bold;">Parameter Name</span></p>
</th>
<th style="vertical-align:middle; width:577px; height:33px; background-color:#99ccff; padding:0px; border:solid thin #000000;"><p style="text-align: center;"><span style="font-size: 8pt; font-weight: bold;">Description</span></p>
</th>
</tr>
</thead>
<tbody>
<tr style="text-align:left;vertical-align:top;">
<td style="vertical-align:top; width:189px; height:33px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p style="text-align: left; margin: 0px 0px 0px 11px;">subsystem_type</p>
</td>
<td style="vertical-align:middle; width:577px; height:33px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p>the type of the auxiliary subsystem (<span style="font-weight: bold;">custom_IO</span> for this application)</p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td style="vertical-align:top; width:189px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p style="text-align: left; margin: 0px 0px 0px 11px;">multicast</p>
</td>
<td style="vertical-align:middle; width:577px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p>flag to enable the multicast communication (NI-PXI does not support the multicast communication yet, so this flag must be set to <span style="font-weight: bold;">0</span>)</p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td style="vertical-align:top; width:189px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p style="text-align: left; margin: 0px 0px 0px 11px;">multicast_group</p>
</td>
<td style="vertical-align:middle; width:577px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p>group address for the multicast communication. If the flag multicast is set to 0, this field is ignored and not read, so for this application this field must set as default</p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td style="vertical-align:top; width:189px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p style="text-align: left; margin: 0px 0px 0px 11px;">client_ip</p>
</td>
<td style="vertical-align:middle; width:577px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p>IP of the VI-DriveSim machine, where the channels are sent/received (<span style="font-weight: bold;">192.168.100.21</span>)</p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td style="vertical-align:top; width:189px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p style="text-align: left; margin: 0px 0px 0px 11px;">client_port</p>
</td>
<td style="vertical-align:middle; width:577px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p>client port number, where the VI-CarRealTime output channels are sent</p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td style="vertical-align:top; width:189px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p style="text-align: left; margin: 0px 0px 0px 11px;">server_port</p>
</td>
<td style="vertical-align:middle; width:577px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p>server port number, where the VI-CarRealTime inputs from VI-DriveSim are received. This field must be different from the client port. If there are no special requirements for the port numbers, these values can be <span style="font-weight: bold;">set as default</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td style="vertical-align:top; width:189px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p style="text-align: left; margin: 0px 0px 0px 11px;">output_decimation</p>
</td>
<td style="vertical-align:middle; width:577px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p>frequency divider in send mode. It can be useful where there are real-time performance limits in the communication and is necessary to decrease the number of UDP packets sent per simulation step. For this application, this field can be set to <span style="font-weight: bold;">1</span>, so the solver sends one UDP packet at each simulation step</p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td style="vertical-align:top; width:189px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p style="text-align: left; margin: 0px 0px 0px 11px;">active</p>
</td>
<td style="vertical-align:middle; width:577px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p>flag to activate/deactivate the auxiliary subsystem. It must be set to <span style="font-weight: bold;">1</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td style="vertical-align:top; width:189px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p style="text-align: left; margin: 0px 0px 0px 11px;">library</p>
</td>
<td style="vertical-align:middle; width:577px; height:35px; background-color:#ffffff; padding:0px; border:solid thin #000000;"><p>name of the dynamic library loaded by the subsystem. It must be filled with the string <span style="font-weight: bold;">crt_nipxi.dll</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p class="p_Normal" style="text-align: left;"><span style="font-size: 12pt; font-weight: bold;">Event Specification</span></p>
<p class="p_Normal">Switch to <span style="font-weight: bold;">Test</span> mode and create a new fingerprint by expanding the Event hierarchy, right click on the <span style="font-weight: bold;">FileDriven</span> item and select <span style="font-weight: bold;">Add Event to New Fingerprint</span>, as shown below.</p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p class="p_Normal">&nbsp;</p>
<p class="p_Normal" style="text-align: center;"><img alt="drvsim_nipxi_event" width="958" height="521" style="margin:0px auto 0px auto;width:958px;height:521px;border:none" src="drvsim_nipxi_event.png"/></p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p class="p_Normal" style="text-align: left;">Now it’s possible to end up with a new event specification as depicted in the following.</p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p class="p_Normal">&nbsp;</p>
<p class="p_Normal" style="text-align: center;"><img alt="drvsim_nipxi_event2" width="960" height="520" style="margin:0px auto 0px auto;width:960px;height:520px;border:none" src="drvsim_nipxi_event2.png"/></p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p class="p_Normal" style="text-align: left;">Please complete the event specification as follows:</p>
<p class="p_Normal" style="text-align: left;">1. &nbsp; &nbsp; &nbsp; &nbsp;Select from the <span style="font-style: italic;">carrealtime_shared</span> database the user_event.vdf as <span style="font-style: italic;">VI-Driver Input File</span>;</p>
<p class="p_Normal" style="text-align: left;">2. &nbsp; &nbsp; &nbsp; &nbsp;Select your preferred rdf file as <span style="font-style: italic;">Road Data File</span>;</p>
<p class="p_Normal" style="text-align: left;">3. &nbsp; &nbsp; &nbsp; &nbsp;Set the <span style="font-style: italic;">Mode of Simulation</span> as <span style="font-style: italic;">files only</span>.</p>
<p class="p_Normal">It is now possible to run the maneuver by clicking the Run icon in order to generate the xml file needed by VI_CarRealTime Simulink Interface to generate the dll for Veristand 2015 SP1. For these steps pease refer to the VI-CarRealTime<span class="f_NormalIndentParameters"> 19.2 Documentation, at the </span>VI-CarRealTime NI-PXI Overlay chapter.</p>
<p class="p_Normal" style="text-align: left;">&nbsp;</p>
<p style="line-height: 2.4; margin: 0px 0px 11px 0px;"><span style="color: #000000;">&nbsp;</span></p>

<!--ZOOMSTOP-->
</div></div>
<script type="text/javascript"> 
<!-- 
var lastSlashPos = document.URL.lastIndexOf("/") >
document.URL.lastIndexOf("\\") ? document.URL.lastIndexOf("/") :
document.URL.lastIndexOf("\\");
if( document.URL.substring( lastSlashPos + 1, lastSlashPos + 4
).toLowerCase() != "~hh" )
{
    nsrInit();
}
--> 
</script> 
</body>
</html>
